<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{padding:0;margin:0;}
        html,body{
            width: 100%; height: 100%; background: red;
        }
    </style>
</head>
<body>
    开始点我
</body>
<script>
    const t = +new Date();
    let index = 0;
    document.body.onclick = () => {
        console.log('click', +new Date() - t);
        console.log('click', ++index);
    }
    setTimeout(() => {
        console.log('timeout', +new Date() - t);
        console.log('timeout', ++index);
    }, 1000);
    setTimeout(() => {
        var a = [];
        for(var i=0;i<79999999;i++){ a.push({name: i, i: i}); }
        console.log('END', +new Date() - t);
        document.body.innerText = '结束';
    }, 100);
</script>
</html>